<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h1>class</h1>
    <script>
        class person{
            constructor(name,age,sex){
                this.name=name;
                this.age=age;
                this.sex=sex
            }
            jump(){
                console.log('练习一下')
            }
            static run(){
                console.log('10m')
            }
            static color='yellow'
        }
        let tom=new person('tom',12,'男');
        console.log(tom)

class Students extends person{
    constructor(name,age,sex,hobby){
        super(name,age,sex);
    }
    jump(){
       super.jump();
     this.hobby=hobby
    }
    static run(){
        super.run()
    }
}
let yyy=new Students('wqwq',21,'nan','打游戏')
console.log(yyy)
yyy.jump();
Students.run()




    </script>
</body>
</html>